import type { ItemSaleChannel } from '@/types/itemSaleChannel'
import type { ItemSale } from '@/types/item'
import type {  PageResult } from '@/types/common'
import type {  ItemSaleChannelParams } from '@/types/itemSaleChannel'
import { http } from '@/utils/http'

/**
 * 分页商品列表
 */
export const pageItemSaleChannel = (data?: ItemSaleChannelParams) => {
  return http<PageResult<ItemSaleChannel>>({
    method: 'GET',
    url: '/api/itemSaleChannel/pageItemSaleChannel',
    data,
  })
}

/**
 * 渠道商品详情
 * @param itemSaleChannelId 渠道商品id
 */
export const selectItemSaleChannelById = (itemSaleChannelId: number) => {
  return http<ItemSaleChannel>({
    method: 'GET',
    url: '/api/itemSaleChannel/selectItemSaleChannelById',
    data: { itemSaleChannelId },
  })
}
